import 'package:boss/color_constant.dart';
import 'package:boss/textStyle/text_style.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flustars/flustars.dart' as flustars;
import 'package:flutter/material.dart';

class DataPanelRow extends StatelessWidget {
  final String title;
  final int orderCount;
  final int price;

  const DataPanelRow(this.title, this.orderCount, this.price);

  @override
  Widget build(BuildContext context) {
    return DefaultTextStyle(
      style: TextStyle(
        height: 1,
      ),
      child: Expanded(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              title,
//              style: TextStyleConstant().normal_3_24,
              style: TextStyle(
                fontSize: 24.sp,
                color: ColorConstant.ff99,
                fontFamily: 'DINAlternate-Bold',
                fontWeight: FontWeight.bold,
              ),
            ),
            Container(
              margin: EdgeInsets.only(
                top: 20.w,
                bottom: 15.w,
              ),
              child: RichText(
                text: TextSpan(
                  text: '¥',
                  style: TextStyleConstant().normal_2_24,
                  children: [
                    TextSpan(
                      text: flustars.MoneyUtil.changeF2Y(price),
                      style: TextStyleConstant().normal_1_34,
                    )
                  ],
                ),
              ),
            ),
            Text(
              '$orderCount笔',
              style: TextStyleConstant().normal_2_24,
            ),
          ],
        ),
      ),
    );
  }
}
